//定义项目标识变量
var clientFlag = '.GT';
require.config({
    baseUrl: '',
    urlArgs: 'v=1.1.0',
    paths: {
                      'jquery' : 'assets/js/jquery/jquery.min',
                     'angular' : 'assets/js/angular/angular1.2.20',
                // 'mc-validator' : 'common/api/mc.validator',
               'SunLight.gold' : 'common/api/gold',
            // 'angular-sanitize' : 'assets/js/angular-sanitize/angular-sanitize.min',
           'angular-ui-router' : 'assets/js/angular-ui-router/angular-ui-router.min',
             //    'angular-aria' : 'assets/js/angular-aria/angular-aria.min',
              'angular-cookies' : 'assets/js/angular-cookies/angular-cookies.min',
       'angular-local-storage' : 'assets/js/angular-local-storage/angular-local-storage',
                 'uiBootstrap' : 'assets/js/angular-ui-bootstrap-bower/ui-bootstrap.10.0',
       // 'angular-toggle-switch' : 'assets/js/angular-toggle-switch/angular-toggle-switch',
               'angular-growl' : 'assets/js/angular-growl/angular-growl',
             //   'angular-audio' : 'assets/js/angular-audio/angular.audio',
             // 'angular-animate' : 'assets/js/angular-animate/angular-animate.min',
             //   'angular-mocks' : 'assets/js/angular-mocks/angular-mocks',
             //   'backend-mocks' : 'common/backend-mocks',
        'angular-couch-potato' : 'assets/js/angular-couch-potato/angular-couch-potato',
                     'barcode' : 'assets/js/barcode/jquery-barcode',
    'bootstrap-datetimepicker' : 'assets/js/jquery.datetimepicker',
                         'app' : 'common/app',
                    'app-init' : 'common/app-init',
                   'routeDefs' : 'common/routeDefs',
                      'config' : 'common/config',
                      // 'jsonDB' : 'common/data',
                      'ui-tree': 'assets/js/angular-ui-tree.min',
                   'constants' : 'common/constants',
                    'mainCtrl' : 'common/controllers/main.ctrl',
                   // 'ui-select' : 'assets/js/angular-ui-select/select',
                'angular-idle': 'assets/js/angular-idle'
    },
    shim: {
        'angular': {
            exports: 'angular'
        },
        // 'angular-sanitize': {
        //     deps: ['angular']
        // },
        'angular-idle':{
            deps: ['angular']
        },
        'SunLight.gold': {
            deps: ['angular']
        },
        //'locale-zh-cn': {
        //    deps: ['angular']
        //},
        // 'angular-aria': {
        //     deps: ['angular']
        // },
        'angular-ui-router': {
            deps: ['angular']
        },
        'angular-cookies': {
            deps: ['angular']
        },
        // 'angular-audio': {
        //     deps: ['angular']
        // },
        'angular-local-storage' : {
            deps: ['angular-cookies']
        },
        // 'angular-animate': {
        //     deps: ['angular']
        // },
        // 'angular-mocks': {
        //     deps : ['angular']
        // },
        'angular-growl': {
            deps      : ['angular']
        },
        'uiBootstrap' : {
            'deps'    : ['angular']
        },
        // 'ui-tree' : {
        //     'deps'    : ['angular']
        // },
        // 'ui-select': {
        //     deps: ['angular-sanitize']
        // },
        // 'angular-toggle-switch': {
        //     'deps'    : ['angular']
        // },
        'bootstrap-datetimepicker': {
            'deps'    : ['angular']
        },
        'barcode': {
            'deps'    : ['jquery']
        }
    },
    priority: [
        'jquery',
        'angular',
        'angular-idle',
        // 'locale-zh-cn',
        'app-init',
        'mainCtrl'
    ],
    waitSeconds: 250
});

require([
    'jquery',
    'angular',
    'angular-idle',
    'app-init',
    'mainCtrl'
],
    function ($, angular) {
        angular.element().ready(function () {
            //手工装配Angular APP
            angular.bootstrap($('#ng-app'), ['SunLight.gold']);
        });
    }
);